package com.ysh.springboot.pojo;



import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Created by Jackiechan on 2022/9/19 10:00
 *
 * @author Jackiechan
 * @version 1.0
 * @since 1.0
 */
@Component
// 配置文件中spring.user 后面的属性会按照名字设置给当前类的对象,属性的名字必须和对象的属性名保持一致
@ConfigurationProperties(prefix = "spring.user")
public class User {
    private String userName;

    private int age;

    private String address;

    private String gender;

    private String phone;


    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
}
